Projection Routines

All the projection routines define a new transformation matrix, and consequently the world units. Parallel projections are defined by ortho or ortho2. Perspective projections can be defined by perspective and window. Note the types Angle, etc, are defined in vogl.h. Remember angles are in tenths of degrees.

void ortho
(Coord left, Coord right, Coord bottom, Coord top, Coord near_fd,Coord far_d)
Define x (left, right), y (bottom, top), and z (near, far) clipping planes. The near and far clipping planes are actually specified as distances along the line of sight. These distances can also be negative. The actual location of the clipping planes is z = -near_d and z = -far_d.

void ortho2
(Coord left,Coord right,Coord bottom,Coord top)
Define x (left, right), and y (bottom, top) clipping planes.

void perspective
(Angle fov,float aspect,Coord near,Coord far)
Specify a perspective viewing pyramid in world coordinates by giving a field of view, aspect ratio and the distance from the eye of the near and far clipping plane.

void window
(Coord left,Coord right,Coord bot,Coord top, Coord near,Coord far)
Specify a perspective viewing pyramid in world coordinates by giving the rectangle closest to the eye (ie. at the near clipping plane) and the distances to the near and far clipping planes.